<template>
	<view>
		<!-- <times @change="getTime"></times> -->
		<view class="content">
			<ren-calendar ref="ren" :markDays="markDays" :headerBar="false" @onDayClick="onDayClick"></ren-calendar>
			<view class="change">选中日期：{{ curDate }}</view>
		</view>
		<view class="bottom">
			<button>确定</button>
		</view>
	</view>
</template>

<script>
// https://ext.dcloud.net.cn/plugin?id=3593#detail插件地址
// import times from '@/components/pretty-times/pretty-times.vue';
import RenCalendar from '@/components/ren-calendar/ren-calendar.vue';
export default {
	components: {
		// times,
		RenCalendar
	},
	data() {
		return {
			curDate: '',
			markDays: []
		};
	},
	onReady() {
		let today = this.$refs.ren.getToday().date;
		this.curDate = today;
		this.markDays.push(today);
	},
	methods: {
		// getTime(e) {
		// 	console.log(e);
		// },
		onDayClick(data) {
			this.curDate = data.date;
		}
	}
};
</script>

<style lang="less">
	.bottom{
		width: 100%;
		position: fixed;
		bottom: 0;
		uni-button{
			background: red;
			color: #FFFFFF;
			border-radius: 0;
		}
	}
</style>
